package com.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
@Table(name="tb_basis_measure")
public class MeasureBean implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -465345808741500734L;
	@Id
	@GenericGenerator(name = "idGenerator", strategy = "sequence", parameters = { @Parameter(name = "sequence", value = "measure_id") })
	@GeneratedValue(generator = "idGenerator")
	private Long measure_id;
	private String measure_type;
	private String measure_name;
	public Long getMeasure_id() {
		return measure_id;
	}
	public void setMeasure_id(Long measure_id) {
		this.measure_id = measure_id;
	}
	public String getMeasure_type() {
		return measure_type;
	}
	public void setMeasure_type(String measure_type) {
		this.measure_type = measure_type;
	}
	public String getMeasure_name() {
		return measure_name;
	}
	public void setMeasure_name(String measure_name) {
		this.measure_name = measure_name;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((measure_id == null) ? 0 : measure_id.hashCode());
		result = prime * result
				+ ((measure_name == null) ? 0 : measure_name.hashCode());
		result = prime * result
				+ ((measure_type == null) ? 0 : measure_type.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MeasureBean other = (MeasureBean) obj;
		if (measure_id == null) {
			if (other.measure_id != null)
				return false;
		} else if (!measure_id.equals(other.measure_id))
			return false;
		if (measure_name == null) {
			if (other.measure_name != null)
				return false;
		} else if (!measure_name.equals(other.measure_name))
			return false;
		if (measure_type == null) {
			if (other.measure_type != null)
				return false;
		} else if (!measure_type.equals(other.measure_type))
			return false;
		return true;
	}
	
	
}